﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class ConfigClick : MonoBehaviour
{

    public GameObject Config_Base;
    public GameObject Config_Hover;
    public GameObject Config_Pressed;
    public GameObject Config_Base1;

    void OnMouseEnter()
    {
        Config_Hover.transform.position = new Vector3(3.537F, 2.53F, 0);
    }

    void OnMouseExit()
    {
        Config_Base.transform.position = new Vector3(3.537F, 2.53F, 0);
        Config_Hover.transform.position = new Vector3(3.537F, 2.53F, 1);
    }

    void OnMouseDown()
    {
        Config_Pressed.transform.position = new Vector3(3.537F, 2.53F, 0);
        Config_Hover.transform.position = new Vector3(3.537F, 2.53F, 1);
    }

    void OnMouseUp()
    {
        if (Config_Base1.transform.position.z == 0)
        {
            Config_Pressed.transform.position = new Vector3(2.79F, 0.83F, -2);
            Config_Base1.transform.position = new Vector3(2.79F, 0.83F, -2);
            return;
        }

        Config_Pressed.transform.position = new Vector3(3.537F, 2.53F, -2);
        Config_Base1.transform.position = new Vector3(2.79F, 0.83F, 0);
    }
}
